<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./font/iconfont.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 100%;
            height: 590px;
            background-color: #f4f4f4;
        }

        .box h2 {
            margin-left: 10px;
            margin-top: 5px;
        }

        .box h3 {
            margin-left: 20px;
        }

        .box #app {
            width: 90%;
            height: 350px;
            background-color: #fff;
            margin: auto;
            border-radius: 10px;
        }

        #app h3 {
            margin-left: 10px;
            margin-top: 10px;
        }

        #app .list {
            width: 95%;
            /* background-color: palegoldenrod; */
            margin: auto;
            display: flex;
            margin-top: 5px;
        }

        .list .left {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 10px;
        }

        .list .left img {
            width: 70px;
            border-radius: 10px;
        }

        .list .middle .name {
            margin-top: 10px;
            font-weight: bold;
        }

        .list .middle .desc {
            font-size: 12px;
            color: orange;
        }

        .list .middle .money {
            font-size: 14px;
            color: orange;
        }

        .list .middle .dian {
            font-size: 14px;
            color: #ccc;
        }

        button {
            width: 50px;
            height: 20px;
            background-color: orangered;
            color: white;
            margin-top: 40px;
            border: none;
            border-radius: 20px;
        }

        .box2 {
            width: 90%;
            height: 120px;
            /* background-color: palegreen; */
            margin: auto;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }

        .box2 .one {
            width: 70px;
            height: 50px;
            background-color: #ffedeb;
            border-radius: 10px;
            margin-left: 10px;
            text-align: center;
            line-height: 50px;
        }

        .box2 .two {
            width: 70px;
            height: 20px;
            background-color: #ffedeb;
            border-radius: 10px;
            margin-left: 10px;
            font-size: 12px;
            text-align: center;
        }

        .dibu {
            width: 90%;
            height: 50px;
            /* background-color: paleturquoise; */
            margin: auto;
            display: flex;
            justify-content: space-around;
        }

        .dibu div {
            width: 50px;
            height: 80px;
            display: flex;
            flex-direction: column;
            text-align: center;
        }

        .dibu .iconfont {
            font-size: 30px;
        }
    </style>
</head>

<body>
    <div class="box">
        <h2>&lt;饿了么</h2>
        <div id="app">
            <h3>热门单品</h3>
            <div class="list" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic" alt="">
                </div>
                <div class="middle">
                    <div class="name">{{item.name}}</div>
                    <div class="desc">{{item.desc}}</div>
                    <div class="money">{{item.money}}</div>
                    <div class="dian">{{item.dian}}</div>
                </div>
                <div class="right">
                    <button>{{item.status}}</button>
                </div>
            </div>
        </div>
        <h3>通用红包限量兑</h3>
        <div class="box2">

            <div class="hezi">
                <div class="one">
                    <p>￥5</p>
                </div>
                <div class="two">
                    <p>满30可用</p>
                </div>
                <h4>吃货联盟红包</h4>
            </div>
            <div class="hezi">
                <div class="one">
                    <p>￥5</p>
                </div>
                <div class="two">
                    <p>满30可用</p>
                </div>
                <h4>吃货联盟红包</h4>
            </div>
            <div class="hezi">
                <div class="one">
                    <p>￥5</p>
                </div>
                <div class="two">
                    <p>满30可用</p>
                </div>
                <h4>吃货联盟红包</h4>
            </div>
        </div>
        <div class="dibu">
            <div>
                <span class="iconfont icon-home"></span>首页
            </div>
            <div>
                <span class="iconfont icon-xitongrizhi"></span>吃货卡
            </div>
            <div>
                <span class="iconfont icon-zhuantiguanli"></span>订单
            </div>
            <div>
                <span class="iconfont icon-yonghu"></span>我的
            </div>
        </div>
        <script src="./vue-2.5.21.js"></script>
</body>

</html>
<script>
    var v = new Vue({
        el: '#app',
        data: {
            tasklist: [
                { id: 1, pic: './img/1.jpg', name: '脐橙3斤 快递到家', desc: '兑换后入手价8.9元', money: 10, dian: '适用门店>', status: '立即兑' },
                { id: 2, pic: './img/2.jpg', name: '粑粑柑3斤 快递到家', desc: '兑换后入手价8.9元', money: 10, dian: '适用门店>', status: '立即兑' },
                { id: 3, pic: './img/3.jpg', name: '水果捞3斤 快递到家', desc: '兑换后入手价8.9元', money: 10, dian: '适用门店>', status: '立即兑' }
            ]
        }
    })
</script>